This repository was archived by the owner on Feb 19, 2025. It is now read-only.
Client side connection timeout and a check for if an object is null. #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's code to add client side timeout for the java stubs. This timeout is defaulted to be 10 minutes and is meant to isolate the caller and xenserver in case there are problems in xenserver's side in processing the request. This allows the client to timeout on the client side and return an error back to the caller instead of tying up the thread waiting for a response that may never come. It is not meant as a retry mechanism.
The second commit adds a method to check if an object is actually null. When a XenAPIObject is null, the marshalling code does not set the object as null. It actually returns an object that contains the words "Opaque:NULL" in them. This method allows the caller to check this condition without writing the hard coded string themselves.